package com.androidx.p013lv.mine.databinding;

import android.graphics.drawable.Drawable;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.appcompat.widget.Toolbar;
import androidx.databinding.DataBindingComponent;
import androidx.databinding.ViewDataBinding;
import androidx.databinding.adapters.ImageViewBindingAdapter;
import androidx.databinding.adapters.TextViewBindingAdapter;
import com.androidx.p013lv.base.bean.UserAccount;
import com.androidx.p013lv.mine.C1206BR;
import com.androidx.p013lv.mine.C1207R;
import com.androidx.p013lv.mine.activity.WalletActivity;
import com.androidx.p013lv.mine.generated.callback.OnClickListener;

/* renamed from: com.androidx.lv.mine.databinding.ActivityWalletLayoutBindingImpl */
public class ActivityWalletLayoutBindingImpl extends ActivityWalletLayoutBinding implements OnClickListener.Listener {
    private static final ViewDataBinding.IncludedLayouts sIncludes = null;
    private static final SparseIntArray sViewsWithIds;
    private final View.OnClickListener mCallback53;
    private final View.OnClickListener mCallback54;
    private final View.OnClickListener mCallback55;
    private final View.OnClickListener mCallback56;
    private final View.OnClickListener mCallback57;
    private final View.OnClickListener mCallback58;
    private long mDirtyFlags;
    private final RelativeLayout mboundView0;
    private final TextView mboundView1;
    private final TextView mboundView10;
    private final TextView mboundView11;
    private final TextView mboundView12;
    private final TextView mboundView2;
    private final ImageView mboundView4;
    private final TextView mboundView5;
    private final LinearLayout mboundView6;
    private final ImageView mboundView7;
    private final TextView mboundView8;
    private final TextView mboundView9;

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        sViewsWithIds = sparseIntArray;
        sparseIntArray.put(C1207R.C1210id.bg_ll, 13);
        sViewsWithIds.put(C1207R.C1210id.toolbar, 14);
    }

    public ActivityWalletLayoutBindingImpl(DataBindingComponent dataBindingComponent, View view) {
        this(dataBindingComponent, view, mapBindings(dataBindingComponent, view, 15, sIncludes, sViewsWithIds));
    }

    private ActivityWalletLayoutBindingImpl(DataBindingComponent dataBindingComponent, View view, Object[] objArr) {
        super(dataBindingComponent, view, 1, (LinearLayout) objArr[13], (LinearLayout) objArr[3], (Toolbar) objArr[14]);
        this.mDirtyFlags = -1;
        this.btnWalletBalance.setTag(null);
        RelativeLayout relativeLayout = (RelativeLayout) objArr[0];
        this.mboundView0 = relativeLayout;
        relativeLayout.setTag(null);
        TextView textView = (TextView) objArr[1];
        this.mboundView1 = textView;
        textView.setTag(null);
        TextView textView2 = (TextView) objArr[10];
        this.mboundView10 = textView2;
        textView2.setTag(null);
        TextView textView3 = (TextView) objArr[11];
        this.mboundView11 = textView3;
        textView3.setTag(null);
        TextView textView4 = (TextView) objArr[12];
        this.mboundView12 = textView4;
        textView4.setTag(null);
        TextView textView5 = (TextView) objArr[2];
        this.mboundView2 = textView5;
        textView5.setTag(null);
        ImageView imageView = (ImageView) objArr[4];
        this.mboundView4 = imageView;
        imageView.setTag(null);
        TextView textView6 = (TextView) objArr[5];
        this.mboundView5 = textView6;
        textView6.setTag(null);
        LinearLayout linearLayout = (LinearLayout) objArr[6];
        this.mboundView6 = linearLayout;
        linearLayout.setTag(null);
        ImageView imageView2 = (ImageView) objArr[7];
        this.mboundView7 = imageView2;
        imageView2.setTag(null);
        TextView textView7 = (TextView) objArr[8];
        this.mboundView8 = textView7;
        textView7.setTag(null);
        TextView textView8 = (TextView) objArr[9];
        this.mboundView9 = textView8;
        textView8.setTag(null);
        setRootTag(view);
        this.mCallback57 = new OnClickListener(this, 5);
        this.mCallback55 = new OnClickListener(this, 3);
        this.mCallback58 = new OnClickListener(this, 6);
        this.mCallback56 = new OnClickListener(this, 4);
        this.mCallback54 = new OnClickListener(this, 2);
        this.mCallback53 = new OnClickListener(this, 1);
        invalidateAll();
    }

    @Override // androidx.databinding.ViewDataBinding
    public void invalidateAll() {
        synchronized (this) {
            this.mDirtyFlags = 32;
        }
        requestRebind();
    }

    @Override // androidx.databinding.ViewDataBinding
    public boolean hasPendingBindings() {
        synchronized (this) {
            if (this.mDirtyFlags != 0) {
                return true;
            }
            return false;
        }
    }

    @Override // androidx.databinding.ViewDataBinding
    public boolean setVariable(int i, Object obj) {
        if (C1206BR.userAccount == i) {
            setUserAccount((UserAccount) obj);
        } else if (C1206BR.type == i) {
            setType((Integer) obj);
        } else if (C1206BR.click != i) {
            return false;
        } else {
            setClick((WalletActivity.OnClick) obj);
        }
        return true;
    }

    @Override // com.androidx.p013lv.mine.databinding.ActivityWalletLayoutBinding
    public void setUserAccount(UserAccount userAccount) {
        updateRegistration(0, userAccount);
        this.mUserAccount = userAccount;
        synchronized (this) {
            this.mDirtyFlags |= 1;
        }
        notifyPropertyChanged(C1206BR.userAccount);
        super.requestRebind();
    }

    @Override // com.androidx.p013lv.mine.databinding.ActivityWalletLayoutBinding
    public void setType(Integer num) {
        this.mType = num;
        synchronized (this) {
            this.mDirtyFlags |= 2;
        }
        notifyPropertyChanged(C1206BR.type);
        super.requestRebind();
    }

    @Override // com.androidx.p013lv.mine.databinding.ActivityWalletLayoutBinding
    public void setClick(WalletActivity.OnClick onClick) {
        this.mClick = onClick;
        synchronized (this) {
            this.mDirtyFlags |= 4;
        }
        notifyPropertyChanged(C1206BR.click);
        super.requestRebind();
    }

    /* access modifiers changed from: protected */
    @Override // androidx.databinding.ViewDataBinding
    public boolean onFieldChange(int i, Object obj, int i2) {
        if (i != 0) {
            return false;
        }
        return onChangeUserAccount((UserAccount) obj, i2);
    }

    private boolean onChangeUserAccount(UserAccount userAccount, int i) {
        if (i == C1206BR._all) {
            synchronized (this) {
                this.mDirtyFlags |= 1;
            }
            return true;
        } else if (i == C1206BR.bala) {
            synchronized (this) {
                this.mDirtyFlags |= 8;
            }
            return true;
        } else if (i != C1206BR.gold) {
            return false;
        } else {
            synchronized (this) {
                this.mDirtyFlags |= 16;
            }
            return true;
        }
    }

    /* access modifiers changed from: protected */
    /* JADX WARNING: Removed duplicated region for block: B:62:0x00d1  */
    /* JADX WARNING: Removed duplicated region for block: B:75:0x00fb  */
    /* JADX WARNING: Removed duplicated region for block: B:78:0x0105  */
    /* JADX WARNING: Removed duplicated region for block: B:83:0x0115  */
    /* JADX WARNING: Removed duplicated region for block: B:86:0x0143  */
    /* JADX WARNING: Removed duplicated region for block: B:89:0x014e  */
    /* JADX WARNING: Removed duplicated region for block: B:94:? A[RETURN, SYNTHETIC] */
    @Override // androidx.databinding.ViewDataBinding
    public void executeBindings() {
        long j;
        String str;
        Drawable drawable;
        int i;
        Drawable drawable2;
        int i2;
        boolean z;
        String str2;
        String str3;
        long j2;
        long j3;
        long j4;
        int i3;
        TextView textView;
        long j5;
        long j6;
        synchronized (this) {
            j = this.mDirtyFlags;
            this.mDirtyFlags = 0;
        }
        UserAccount userAccount = this.mUserAccount;
        Integer num = this.mType;
        WalletActivity.OnClick onClick = this.mClick;
        String str4 = null;
        int i4 = 0;
        if ((j & 59) != 0) {
            int safeUnbox = ViewDataBinding.safeUnbox(num);
            long j7 = j & 34;
            z = true;
            if (j7 != 0) {
                boolean z2 = safeUnbox == 2;
                if (j7 != 0) {
                    if (z2) {
                        j6 = j | 128;
                        j5 = 131072;
                    } else {
                        j6 = j | 64;
                        j5 = 65536;
                    }
                    j = j6 | j5;
                }
                drawable = getDrawableFromResource(this.mboundView7, z2 ? C1207R.C1209drawable.mine_ic_wallet_gold_red : C1207R.C1209drawable.mine_ic_wallet_gold_gray);
                if (z2) {
                    textView = this.mboundView8;
                    i3 = C1207R.C1208color.white;
                } else {
                    textView = this.mboundView8;
                    i3 = C1207R.C1208color.d8d8d8;
                }
                i2 = getColorFromResource(textView, i3);
            } else {
                drawable = null;
                i2 = 0;
            }
            if (safeUnbox != 1) {
                z = false;
            }
            if ((j & 34) != 0) {
                if (z) {
                    j4 = j | 512 | 8192;
                    j3 = 32768;
                } else {
                    j4 = j | 256 | 4096;
                    j3 = 16384;
                }
                j = j4 | j3;
            }
            if ((j & 59) != 0) {
                j = z ? j | 2048 : j | 1024;
            }
            if ((j & 34) != 0) {
                drawable2 = getDrawableFromResource(this.mboundView4, z ? C1207R.C1209drawable.mine_ic_wallet_balance_red : C1207R.C1209drawable.mine_ic_wallet_balance_gray);
                str = z ? "賬戶余額(元)" : "金幣余額(個)";
                i = getColorFromResource(this.mboundView5, z ? C1207R.C1208color.white : C1207R.C1208color.d8d8d8);
                if ((j & 3072) == 0) {
                    if ((1024 & j) != 0) {
                        if (userAccount != null) {
                            i4 = userAccount.getGold();
                        }
                        str2 = String.valueOf(i4);
                    } else {
                        str2 = null;
                    }
                    if ((2048 & j) != 0) {
                        str3 = String.valueOf(userAccount != null ? userAccount.getBala() : 0.0d);
                    } else {
                        str3 = null;
                    }
                } else {
                    str3 = null;
                    str2 = null;
                }
                j2 = 59 & j;
                if (j2 != 0) {
                    str4 = z ? str3 : str2;
                }
                if ((32 & j) != 0) {
                    this.btnWalletBalance.setOnClickListener(this.mCallback55);
                    this.mboundView1.setOnClickListener(this.mCallback53);
                    this.mboundView11.setOnClickListener(this.mCallback57);
                    this.mboundView12.setOnClickListener(this.mCallback58);
                    this.mboundView2.setOnClickListener(this.mCallback54);
                    this.mboundView6.setOnClickListener(this.mCallback56);
                }
                if (j2 != 0) {
                    TextViewBindingAdapter.setText(this.mboundView10, str4);
                }
                if ((j & 34) == 0) {
                    ImageViewBindingAdapter.setImageDrawable(this.mboundView4, drawable2);
                    this.mboundView5.setTextColor(i);
                    ImageViewBindingAdapter.setImageDrawable(this.mboundView7, drawable);
                    this.mboundView8.setTextColor(i2);
                    TextViewBindingAdapter.setText(this.mboundView9, str);
                    return;
                }
                return;
            }
            drawable2 = null;
            str = null;
        } else {
            drawable2 = null;
            drawable = null;
            str = null;
            z = false;
            i2 = 0;
        }
        i = 0;
        if ((j & 3072) == 0) {
        }
        j2 = 59 & j;
        if (j2 != 0) {
        }
        if ((32 & j) != 0) {
        }
        if (j2 != 0) {
        }
        if ((j & 34) == 0) {
        }
    }

    @Override // com.androidx.p013lv.mine.generated.callback.OnClickListener.Listener
    public final void _internalCallbackOnClick(int i, View view) {
        boolean z = false;
        boolean z2 = true;
        switch (i) {
            case 1:
                WalletActivity.OnClick onClick = this.mClick;
                if (onClick != null) {
                    z = true;
                }
                if (z) {
                    onClick.btnBack();
                    return;
                }
                return;
            case 2:
                WalletActivity.OnClick onClick2 = this.mClick;
                if (onClick2 != null) {
                    z = true;
                }
                if (z) {
                    onClick2.goDetails();
                    return;
                }
                return;
            case 3:
                WalletActivity.OnClick onClick3 = this.mClick;
                if (onClick3 != null) {
                    z = true;
                }
                if (z) {
                    onClick3.switchBalanceOrGold(1);
                    return;
                }
                return;
            case 4:
                WalletActivity.OnClick onClick4 = this.mClick;
                if (onClick4 != null) {
                    z = true;
                }
                if (z) {
                    onClick4.switchBalanceOrGold(2);
                    return;
                }
                return;
            case 5:
                WalletActivity.OnClick onClick5 = this.mClick;
                if (onClick5 == null) {
                    z2 = false;
                }
                if (z2) {
                    onClick5.goTopUp(0);
                    return;
                }
                return;
            case 6:
                WalletActivity.OnClick onClick6 = this.mClick;
                if (onClick6 != null) {
                    z = true;
                }
                if (z) {
                    onClick6.goTopUp(1);
                    return;
                }
                return;
            default:
                return;
        }
    }
}
